package shoooter.geometry;


public class Vec2 extends Vector {

    public Vec2() {
        super(0, 0, 0);
    }

    public Vec2(double x, double y) {
        super(x, y, 0);
    }

    public Vec2(Vec2 v) {
        super(v.getX(), v.getY(), 0);
    }

    public static Vec2 nullVec2() {
        return new Vec2(0,0);
    }

    public static double distance(Vec2 p1, Vec2 p2) {

        double distance;

        distance = Math.pow((p1.getX() - p2.getX()),2) + Math.pow((p1.getY() - p2.getY()),2);
        distance = Math.sqrt(distance);

        return distance;
    }
}
